import { createApp } from 'vue'
import App from '@/App.vue'
import '@/styles/index.scss'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// svg 插件需要的配置代码
import 'virtual:svg-icons-register'
// 引入自定义插件对象，注册全家组件
import globalComponent from '@/components'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import router from './router'
import pinia from '@/store'

const app = createApp(App)
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(globalComponent)
app.use(pinia)
app.use(router)

import './permission'
import { isHasButton } from './directive/has'
// 映入自定义指令方法
isHasButton(app)
app.mount('#app')
